package com.lyf.service.impl;

import com.lyf.dao.DocumentDao;
import com.lyf.dao.impl.DocumentDaoImpl;
import com.lyf.pojo.Document;
import com.lyf.service.DocumentService;
import com.lyf.utils.PageModel;
import com.lyf.vo.CountVoByName;

import java.util.List;

public class DocumentServiceImpl implements DocumentService {
    DocumentDao documentDao = new DocumentDaoImpl();
    @Override
    public void uploadFile(Document document) {
        documentDao.uploadFile(document);
    }

    @Override
    public void delete(Integer id) {
        documentDao.delete(id);
    }

    @Override
    public List<CountVoByName> selectFileCount() {
        return documentDao.selectFileCount();
    }

    @Override
    public Document selectById(Integer id) {
        return documentDao.selectById(id);
    }

    @Override
    public List<Document> queryDocument(Document document, PageModel model) {
        return documentDao.queryDocument(document,model);
    }

    @Override
    public int getTotalDocumentCount(Document document) {
        return documentDao.getTotalDocumentCount(document);
    }
}
